package com.example.reader.controller;

import com.example.reader.common.Result;
import com.example.reader.entity.User;
import com.example.reader.service.UserService;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/user")
public class Usercontroller {


    @Resource
    private UserService userService;
    /**
     * 个人信息修改
     */
    @PutMapping("/update")
    public Result update(@RequestBody User user) {
        userService.updateById(user);
        return Result.success();
    }
}
